package com.wyl.auth.captcha;

import com.wyl.common.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author WuYiLong
 * @Date 2025/4/12 13:49
 */
@Api(tags = "验证码")
@RestController
@RequestMapping(value = "captcha")
public class CaptchaController {

    @Autowired
    private CaptchaService captchaService;

    @ApiOperation(value = "生成验证码")
    @GetMapping(value = "generateCaptcha")
    public ResponseData generateCaptcha() {
        return ResponseData.getSuccessInstance(captchaService.generateCaptcha());
    }
}